//package com.publicstaticdroid.g2l_interpreter_connect;
//
//import android.app.Activity;
//import android.content.Intent;
//import android.net.Uri;
//import android.os.Bundle;
//import android.util.Log;
//import android.view.KeyEvent;
//import android.view.View;
//import android.widget.TextView;
//
///**
// * @deprecated
// * @author Nathan Breit
// *
// */
//public class AfterCallActivity extends Activity
//{
//	private Uri calledNumber;
//	private int requestID;
//	private long callDuration;
//	/** Called when the activity is first created. */
//	// Is it possible for this to get called in circumstances other than the activity being started from MakeCallActivity? (configuration change?)
//	// Maybe finish on pause since there isn't a reason to come back to this after navigating away form it.
//	@Override
//	public void onCreate(Bundle savedInstanceState) {
//		super.onCreate(savedInstanceState);
//		setContentView(R.layout.after_call);
//		
//		calledNumber = getIntent().getData();
//		requestID = getIntent().getIntExtra("requestID", -1);
//		callDuration = getIntent().getLongExtra("callDuration", 0);
//	}
//	/**
//	 * Update the stats displayed on the home screen.
//	 * @param callDuration in millis
//	 */
//	@Override
//	protected void onResume() {
//		super.onResume();
//		updateStats();
//	}
//	private void updateStats() {
//		TextView interpretationTimeView = (TextView) findViewById(R.id.interpretationTime);
//		interpretationTimeView.setText("Call Length: " + callDuration/(1000) + " seconds");
//	}
//	//Ideally this only comes though MakeCallActivity
//	@Override
//	protected void onNewIntent(Intent intent) {
//		super.onNewIntent(intent);
//		Log.i("G2L", "AfterCall onNewIntent");
//		callDuration += intent.getLongExtra("callDuration", 0);
//	}
//	//Linked directly to button in after_call.xml
//	public void redial(View view) {
//		Intent callIntent = new Intent(getApplicationContext(), MakeCallActivity.class);
//		callIntent.setData(calledNumber);
//		callIntent.putExtra("requestID", requestID);
//		startActivity(callIntent);
//	}
//	//Linked directly to button in after_call.xml
//	//Should do the same thing as pressing home or back.
//	public void done(View view) {
//		SMSSender texter = new SMSSender(Constants.SERVER_PHONE);
//		texter.sendFinished(requestID, callDuration);
//		finish();
//	}
//	@Override
//	public boolean onKeyDown(int keyCode, KeyEvent event) {
//	    if ((keyCode == KeyEvent.KEYCODE_BACK)||(keyCode == KeyEvent.KEYCODE_HOME)) {
//	        Log.d(this.getClass().getName(), "button pressed");
//	    }
//	    done(null);
//	    return super.onKeyDown(keyCode, event);
//	}
//}
